package ar.com.tesis.mobile.Utils;

import android.content.Context;
import android.graphics.Typeface;
import android.widget.TextView;

/**
 * Created by Fernando on 16/11/2014.
 */
public class FuentesUtil {

    public static void aplicarFuente(Context context, Fuente fuente, TextView textView) {

        if (textView != null) {

            Typeface tf = Typeface.createFromAsset(context.getAssets(), "fonts/" + fuente.nombre + "." + fuente.extension);
            textView.setTypeface(tf);
        }
    }

    public enum Fuente {

        LATO_BLACK ("Lato-Black", "ttf"),
        LATO_BLACK_ITALIC ("Lato-BlackItalic", "ttf"),
        LATO_BOLD ("Lato-Bold", "ttf"),
        LATO_BOLD_ITALIC ("Lato-BoldItalic", "ttf"),
        LATO_HAIRLINE ("Lato-Hairline", "ttf"),
        LATO_HAIRLINE_ITALIC ("Lato-HairlineItalic", "ttf"),
        LATO_ITALIC ("Lato-Italic", "ttf"),
        LATO_LIGHT ("Lato-Light", "ttf"),
        LATO_LIGHT_ITALIC ("Lato-LightItalic", "ttf"),
        LATO ("Lato-Regular", "ttf"),
        TREBUCHET_MS("TrebuchetMS", "ttf"),
        TREBUCHET_MS_BOLD("TrebuchetMSBold", "ttf"),
        TREBUCHET_MS_ITALIC("TrebuchetMSItalic", "ttf");

        private String nombre;
        private String extension;

        private Fuente(String nombre, String extension) {
            this.nombre = nombre;
            this.extension = extension;
        }
    }
}
